<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/shop/style/style.css">
<script type="text/ecmascript" src="__PUBLIC__/shop/js/jquery-1.8.1.js"></script>
<script type="text/ecmascript" src="__PUBLIC__/shop/js/pay.js"></script>
<title>付款详情</title>
<script>
$(function(){
   $(".div2 ul").click(function(){
	   $(".lv_img").hide();
	   })	
	})
$(function(){
  $(".div5").hide();
  $(".pay_zhe").hide();
  $(".pay .div3").click(function(){
    $(".div5,.pay_zhe").show();
    })
  });
  $(function(){
  $(".div5 .p1 img").click(function(){
    $(".div5,.pay_zhe").hide();
    })
  });
</script>
</head>

<body>
<div class="box">
<!-- <div class="top">
    <a href="javascript:;" onclick="javascript:history.back(-1);"><p class="dayu"><img src="__PUBLIC__/shop/image/1.jpg"></p></a>
    <p class="biaoti"><span class="span2">付款详情</span></p>
</div> --><!--top-->
<form  method="post" id="recharge" action="">
<div class="clear"></div>
    <div class="pay">
    <div class="div1">
    <span class="span1">需付款</span><span class="span2" ><span id="sumoney"><{$money}></span>元</span>
    </div><!--div1-->
    <div class="clear"></div>
    <div class="div2">
              <div class="pay_02">
              <ul>
              <i></i>
              <li> <label class="ui-checkbox2">
					<span><img src="__PUBLIC__/shop/image/37.jpg">支付宝支付</span><input type="radio" name="zhifu" checked="checked" id="zhifubao" value="支付宝"><!-- <img src="__PUBLIC__/shop/image/check_four01.png" style="" class="lv_img"> -->
							</label></li>
                            
              <!-- </ul>
              <div class="clear"></div>
              <ul>
              <i></i>
              <li> <label class="ui-checkbox2">
            <span><img src="__PUBLIC__/shop/image/38.jpg">微信支付</span><input type="radio" name="zhifu" id="weixin">
            </label></li>
              </ul> -->
             </div><!--pay-02-->
	
            <!--底部-->
			<!--底部结束-->
    </div><!--div2-->
    <div class="clear"></div>
    <div class="div3">
   <a href="javascript:;">
   <span class="span1"><img src="__PUBLIC__/shop/image/39.jpg">银行卡支付</span>
   <span class="span2"><img src="__PUBLIC__/shop/image/40.jpg"></span>
   </a>
   </div>
   <div class="clear"></div>
   <div>
    <div class="div4">
      <input type="hidden" name="money" value="<{$money}>">
      <input type="hidden" name="phone" value="<{$phone}>">
      <input type="hidden" name="username" value="<{$username}>">
      <input type="hidden" name="openid" value="">
      <input type="hidden" name="bankname" value="">
      <a href="javascript:void(0)" class="submit">确认支付</a>
      <!-- <input type="submit" value="确认支付" onClick="radios()"/> -->
    </div><!--div4-->
    </div><!--pay-->
    <div class="pay_zhe"></div><!--pay_zhe-->
     <div class="div5">
    <div class="p1">
    <p><img src="__PUBLIC__/shop/image/50.jpg"></p>
    <p class="span2">选择银行卡付款</p></div>
    <empty name="msg" >
    <div class='clear'></div>
    <div class='p2'>您还没有银行卡，先添加一张银行卡吧</div>
    </empty>
    <notempty name="msg" >
    <foreach name="msg" item="v">
      <div class='clear'></div>
      <div class="p21 data_<{$v.OpenId}>" data-id="<{$v.OpenId}>">
          <dl>
              <dt><img src="/<{$v.plantBankLogo}>"></dt>
              <dd class="dd1 dd1_<{$v.OpenId}>"><{$v.plantBankName}>(<{$v.accNo}>)</dd>
              <dd class="dd2">可用额度20,000.00元</dd>
          </dl>
      </div>
    </foreach>
    </notempty>
    <div class="clear"></div>
    <a href="<{:U('Pay/pingan_pay')}>"><div class="p3">
    <span class="span1">添加银行卡付款</span>
    <span class="span2"><img src="__PUBLIC__/shop/image/51.jpg"></span>
    </div>
    </a>
    </div>
    </form>
</div><!--box-->
<script type="text/javascript">
  var browser={
    versions:function(){
      var u = navigator.userAgent, 
        app = navigator.appVersion;
      return {
        trident: u.indexOf('Trident') > -1, //IE内核
        presto: u.indexOf('Presto') > -1, //opera内核
        webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核
        mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
        android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
        iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
        iPad: u.indexOf('iPad') > -1, //是否iPad
        webApp: u.indexOf('Safari') == -1, //是否web应该程序，没有头部与底部
        weixin: u.indexOf('MicroMessenger') > -1, //是否微信 （2015-01-22新增）
        qq: u.match(/\sQQ/i) == " qq" //是否QQ
      };
    }(),
    language:(navigator.browserLanguage || navigator.language).toLowerCase()
  }

  $('.p21').click(function(){
    var id=$(this).data('id');
    var text=$('.dd1_'+id).text();
    $('input[name=openid]').attr('value',id);
    $('input[name=bankname]').attr('value',text);
    // var openid=$("input[name=openid]").val();
    var money=$('input[name=money]').val(); 
    // var bankname=$('input[name=bankname]').val();
     window.location.href='/index.php/Home/Pay/pay?money='+money+'&openid='+id+'&bankname='+text;
  });
  $('.submit').click(function(){
    var openid=$("input[name=openid]").val();
    var money=$('input[name=money]').val(); 
    var bankname=$('input[name=bankname]').val(); 
    var order=$('input[name=order]').val(); 
    var phone=$('input[name=phone]').val();
    var username=$('input[name=username]').val();
    if(money!=''&& money>0){
      if($("#weixin").attr("checked")){
        window.Yunoso.WXChat(money+"");
      }else{
        window.location.href='/index.php/Home/Pay/post_app_pay?money='+money;
        // $('#recharge').attr('action','/index.php/Shop/Pay/post_app_pay');
        // document.getElementById("recharge").action='http://localhost:91/index.php/Shop/Pay/post_app_pay';
      }
    }
  });
</script>
</body>

</html>
